<template>
	<div>
		<van-row style="width: 100vw;height: 15vh;position: fixed;bottom: 0px;"></van-row>
		<van-goods-action>
		  <van-goods-action-icon icon="chat-o" text="客服" />
		  <van-goods-action-icon icon="cart-o" text="购物车" />
		  <van-goods-action-button color="#fe8468" type="warning" text="加入购物车" @click="enter"/>
		  <!-- @click="enter" -->
		  <van-goods-action-button color="#f5932a" type="danger" text="立即购买" />
		</van-goods-action>
	</div>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		props:{
			lists:{
				default:()=>[]
			}
		},
	  data() {
	    return {
	      
	    };
	  },
	  computed: {
	  	...mapGetters([
	  		'addcarts'
	  	])
	  },
	  created() {
	  	
	  },
	  methods:{
		  
		  enter(){
			  let addcartmenu = this.lists
			  let member_id = JSON.parse(localStorage.getItem('usernews')).member_id
			  addcartmenu.member_id = member_id
			  console.log(addcartmenu)
			  this.$store.dispatch("vuexAddcart",addcartmenu)
			  	.then(e => {
			  		console.log(e)
					this.$router.push({path:'/cart'})
			  		// this.lists = e.data.data
					
			  	})
		  }
	  }
	}
</script>

<style>
</style>
